home *** CD-ROM | disk | FTP | other *** search
/ Clickx 23 / Clickx 23.iso / Menu.dcr / 00001_movie script.ls next >
Encoding:
Text File  |  2005-09-14  |  1.3 KB  |  66 lines

  1. global gPlatform, gGroep, gFile, gLinks
  2.  
  3. on startMovie
  4.   if gPlatform = VOID then
  5.     if the platform contains "windows" then
  6.       gPlatform = "PC"
  7.     else
  8.       gPlatform = "MAC"
  9.     end if
  10.     gGroep = 1
  11.     gGroepNaam = EMPTY
  12.     gFile = 1
  13.     gLinks = []
  14.     loadDB()
  15.   end if
  16.   if the runMode contains "Author" then
  17.   else
  18.     if the platform contains "Windows" then
  19.       window().new("info")
  20.       window("info").titlebarOptions.closebox = 1
  21.       window("info").open()
  22.     else
  23.       open(window("info"))
  24.     end if
  25.   end if
  26. end
  27.  
  28. on stopMovie
  29.   unloadDB()
  30.   clearGlobals()
  31. end
  32.  
  33. on deleteLogos
  34.   repeat with spriteNr in gLinks
  35.     sprite(spriteNr).puppet = 0
  36.     sprite(spriteNr).scriptInstanceList = []
  37.     sprite(spriteNr).visible = 0
  38.   end repeat
  39.   gLinks = []
  40.   updateStage()
  41. end
  42.  
  43. on findID list, id
  44.   repeat with i = 1 to list.count
  45.     if list[i].id = id then
  46.       return i
  47.       exit
  48.     end if
  49.   end repeat
  50.   return 0
  51. end
  52.  
  53. on SearchAndReplace input, stringToFind, stringToInsert
  54.   output = EMPTY
  55.   findLen = stringToFind.length - 1
  56.   repeat while input contains stringToFind
  57.     currOffset = offset(stringToFind, input)
  58.     output = output & input.char[1..currOffset]
  59.     delete char -30000 of output
  60.     output = output & stringToInsert
  61.     delete input.char[1..currOffset + findLen]
  62.   end repeat
  63.   output = output & input
  64.   return output
  65. end
  66.